@extends('layouts.default')  
@section('content')
<div style="text-align:left;" class="box primary">
    <header>
        <div class="icons">
            <i class="fa fa-edit"></i>
        </div>
        <h5>{{Lang::get('rentals.create_rental')}}</h5>
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div>
    </header>

    <div id="div-1" class="body">
        @foreach($vehicle as $c)
        {{ Form::model($c, array(
                     'route' => array('customer_save', $rentalId),
                     'method' => 'PUT',
                     'class'=>'form-horizontal',
                     'id'=>'form-validate')) 
        }}
        <div style="float:right;">
            <span class="btn btn-warning btn-xs">{{Lang::get('messages.class').': '.$c->class_name}}</span>
            <span class="btn btn-warning btn-xs">{{Lang::get('messages.license').': '.$c->License}}</span>
            <span class="btn btn-warning btn-xs">{{Lang::get('messages.model').': '.$c->Model}}</span>
        </div><br/><br/>
        <div style="text-align:center;" class="alert alert-info" ><b>Klienti</b></div>       
        <div class="form-group">
            {{ Form::label('cfirstname', Lang::get('rentals.cfirstname').'*', 
                            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('cfirstname',isset($cfirstname)?$cfirstname:'', array(
                                'placeholder' =>Lang::get('rentals.cfirstname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>               
        </div> 
        <div class="form-group">
            {{ Form::label('clastname', Lang::get('rentals.clastname').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('clastname',isset($clastname)?$clastname:'', array(
                                'placeholder' =>Lang::get('rentals.clastname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('drpasportid', Lang::get('rentals.drpasportid').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drpasportid',isset($drpasportid)?$drpasportid:'', array(
                                'placeholder' =>Lang::get('rentals.drpasportid'),
                                'class' => 'form-control',
                'readonly'=>true
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('caddress', Lang::get('rentals.caddress').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('caddress',isset($caddress)?$caddress:'', array(
                                'placeholder' =>Lang::get('rentals.caddress'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drcity', Lang::get('rentals.drcity').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drcity',isset($drcity)?$drcity:'', array(
                                'placeholder' =>Lang::get('rentals.drcity'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drcountry', Lang::get('rentals.drcountry').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drcountry',isset($drcountry)?$drcountry:'', array(
                                'placeholder' =>Lang::get('rentals.drcountry'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dremail', Lang::get('rentals.dremail'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dremail',isset($dremail)?$dremail:'', array(
                                'placeholder' =>Lang::get('rentals.dremail'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drhphone', Lang::get('rentals.drhphone').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drhphone',isset($drhphone)?$drhphone:'', array(
                                'placeholder' =>Lang::get('rentals.drhphone'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('workphone', Lang::get('rentals.workphone'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('workphone',isset($workphone)?$workphone:'', array(
                                'placeholder' =>Lang::get('rentals.workphone'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('companyname', Lang::get('rentals.companyname'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('companyname',isset($companyname)?$companyname:'', array(
                                'placeholder' =>Lang::get('rentals.companyname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div style="text-align:center;" class="alert alert-info" ><b>Shoferi Kryesor</b></div> 

        <div class="form-group">
            {{ Form::label('drfirstname', Lang::get('rentals.drfirstname').'*', 
                            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drfirstname',isset($cfirstname)?$cfirstname:'', array(
                                'placeholder' =>Lang::get('rentals.drfirstname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>               
        </div> 
        <div class="form-group">
            {{ Form::label('drlastname', Lang::get('rentals.drlastname').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drlastname',isset($clastname)?$clastname:'', array(
                                'placeholder' =>Lang::get('rentals.drlastname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('drbdate', Lang::get('rentals.drbdate').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Helpers\Helper::date('drbdate', isset($dob)?$dob:'' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drlexpdate', Lang::get('rentals.drlexpdate').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('drlexpdate', isset($drlexpdate)?$drlexpdate:'' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drliccat', Lang::get('rentals.drliccat').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drliccat',isset($drliccat)?$drliccat:'', array(
                                'placeholder' =>Lang::get('rentals.drliccat'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drlicnr', Lang::get('rentals.drlicnr').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drlicnr',isset($drlicnr)?$drlicnr:'', array(
                                'placeholder' =>Lang::get('rentals.drlicnr'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div style="text-align:center;" class="alert alert-info" ><b>Shoferi Tjeter</b></div> 

        <div class="form-group">
            {{ Form::label('dr2fname', Lang::get('rentals.dr2fname'), 
                            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2fname','', array(
                                'placeholder' =>Lang::get('rentals.dr2fname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>               
        </div> 
        <div class="form-group">
            {{ Form::label('dr2lastname', Lang::get('rentals.dr2lastname'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2lastname','', array(
                                'placeholder' =>Lang::get('rentals.dr2lastname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('draddress', Lang::get('rentals.draddress'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('draddress','', array(
                                'placeholder' =>Lang::get('rentals.draddress'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2bdate', Lang::get('rentals.dr2bdate'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('dr2bdate', '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2licexpdate', Lang::get('rentals.dr2licexpdate'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('dr2licexpdate', '' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2liccat', Lang::get('rentals.dr2liccat'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2liccat','', array(
                                'placeholder' =>Lang::get('rentals.dr2liccat'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2licnr', Lang::get('rentals.dr2licnr'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2licnr','', array(
                                'placeholder' =>Lang::get('rentals.dr2licnr'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2city', Lang::get('rentals.dr2city'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2city','', array(
                                'placeholder' =>Lang::get('rentals.dr2city'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2country', Lang::get('rentals.dr2country'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2country','', array(
                                'placeholder' =>Lang::get('rentals.dr2country'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div  class="form-group" >
            {{ Form::label('fuelin', Lang::get('messages.fuel'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div id="slider" class="col-lg-6 slider" style="width: 40%; left:25px;text-align: right;"><br/>
                <div class="slider-div"></div>
                {{ Form::text('fuelin',  isset($c->fuel) ? $c->fuel : '', array(
                                'style' => 'border:0; color:blue; width: 10%; font-weight:bold;',
                                'class'=>'fuel')) }}                           
            </div>                                
        </div>
        <div class="form-group">
            {{ Form::label('kmin', Lang::get('messages.milage'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">

                {{ Form::text('kmin',isset($c->Milage) ? $c->Milage: '', array(
                                'placeholder' =>Lang::get('messages.milage'),
                                'class' => 'form-control',
                                'readonly'=>true
                                )) 
                }}
            </div>
        </div>
        <div class="row form-group">
            {{ Form::label('nrdays', Lang::get('rentals.result'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-1">
                {{Form::text ('nrdays',$nrdays, array(
                                'placeholder' =>Lang::get('rentals.nrdays'),
                                'class' => 'form-control',
                                'readonly'=>true))}}
            </div><!-- /.col-lg-4 -->
            <div class="col-lg-2">
                {{Form::text ('rate',$rate, array(
                                'placeholder' =>Lang::get('rentals.rate'),
                                'class' => 'form-control'))}}
            </div><!-- /.col-lg-4 -->
            <div class="col-lg-1">
                <a id="res-btn" class="btn btn-default" data-original-title="" title="">=</a>
            </div>
            <div class="col-lg-2">
                {{Form::text ('result',$result, array(
                                'placeholder' =>Lang::get('rentals.result'),
                                'class' => 'form-control',
                                'id'=>'result-reservation'))}}
            </div>

        </div>
        <div class="form-group">
            {{ Form::label('curency', Lang::get('rentals.curency'), array('class'=>'control-label col-lg-4')) }}

            <div class="col-lg-6">
                {{ Form::select('curency',$currencies, Input::old('currencies'), array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('rentals.curency'))) 
                }}
            </div> 
        </div>
        <div class="form-group">
            {{ Form::label('agency', Lang::get('rentals.agency'), array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::select('agency', array(
                                '' => ''), Input::old('agency'), array(
                                'placeholder' =>Lang::get('rentals.agency'),
                                'class' => 'form-control')) 
                }}
            </div>     
        </div><br/><div id="validation-div"></div>
        {{ Form::hidden('vehicle', $c->id, array('id' => 'invisible_vehicle')) }}
        {{ Form::hidden('make', $c->Make, array('id' => 'invisible_make')) }}
        {{ Form::hidden('model', $c->Model, array('id' => 'invisible_model')) }}
        {{ Form::submit(Lang::get('rentals.check_out'), array('class' => 'btn btn-success btn-line')) }}          
        <input type="button" value="{{ Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" 
               onClick="history.go(-1);
                       return true;">

        {{ Form::close() }}
        @endforeach
    </div>
    <div id="div-customer"></div>
</div>
@stop

